package com.roadmap.common;

/** 带权限的类都应该继承此类 */
public abstract class BaseAuthEntity extends BaseEntity {
	private int visibility;
	private String limitedMembers;
	
	public BaseAuthEntity() {
		this.visibility = BaseConst.ENTRY_VISIBILITY_PROTECTED;
	}

	public int getVisibility() {
		return visibility;
	}

	public void setVisibility(int visibility) {
		this.visibility = visibility;
	}

	public String getLimitedMembers() {
		return limitedMembers;
	}

	public void setLimitedMembers(String limitedMembers) {
		this.limitedMembers = limitedMembers;
	}

	public String getVisibilityDesc() {
		if (this.getVisibility() >= 0
				&& this.getVisibility() < RdcResourceBundle.ENTITY_VISIBILITY_DESCRIPTIONS.length) {
			return RdcResourceBundle.ENTITY_VISIBILITY_DESCRIPTIONS[this
					.getVisibility()];
		}
		return null;
	}
}
